package lab02.Test06;

/**
 * Created by lenovo on 2017/10/14.
 */import java.util.Scanner;
public class Ladder {
    double a,b,h,area;//a是上底，b是下底，h是高，area是面积。
    Scanner sr=new Scanner(System.in);
    //a=in.nextDouble();
    public void Input(){
        System.out.println("请输入上底、下底、高：");
        a=sr.nextDouble();
        b=sr.nextDouble();
        h=sr.nextDouble();
        area=(a+b)*h/2;
        System.out.println("梯形面积是:"+area);
    }

    public static void main(String[] args) {

    }

}


